package tests;


import tester.Arguments;
import tester.EffectField;
import tester.Example;
import tester.TestMethod;
import tester.Tester;
import tests.pojos.Address;
import tests.pojos.AuthorWithArrays;
import tests.pojos.BookWithArrays;
import tests.pojos.Person;

@Example
public class TestEffect {

	@TestMethod
	public void test(Tester t) {
		BookWithArrays bond = new BookWithArrays("Casino Royale", 1960);
		AuthorWithArrays flemming = new AuthorWithArrays("Ian Flemming");
		bond.setAuthor(flemming);
		flemming.addBook(bond);
		Arguments args = new Arguments(new String("Tomorrow Never Dies"));
		EffectField field = new EffectField("title",
				new String("Tomorrow Never Dies"));
		t.checkEffect(bond, "setTitle", args, field);

	}

	@TestMethod
	public void testPerson(Tester t) {
		Person wes = new Person("Weston Jossey", 23, new Address(203,
				"Boston Ave", "Medford", 02155, "MA"));
		Arguments args = new Arguments(new String("Weston Lee Jossey"));
		EffectField field = new EffectField ("name",
				"Weston Lee Jossey");
		t.checkEffect(wes, "setName", args, field);

	}
}
